<template>

  <router-view />
  <div id="nav">
    <router-link class="tab-bar-item" to="/">
      <div class="icon">
        <i class="el-icon-s-home"></i>
      </div>
      <div>首页</div>
    </router-link>
    <router-link class="tab-bar-item" to="/category">
      <div class="icon">
        <i class="el-icon-present"></i>
      </div>
      <div>分类</div>
    </router-link>
    <router-link class="tab-bar-item" to="/shopcart">
      <div class="icon">
        <i class="el-icon-shopping-cart-2"></i>
      </div>
      <div>购物车</div>
    </router-link>
    <router-link class="tab-bar-item" to="/profile">
      <div class="icon">
        <i class="el-icon-user-solid"></i>
      </div>
      <div>我的</div>
    </router-link>
  </div>
</template>
<script>
import { reactive, toRefs } from 'vue'

export default {
  
  setup () {
        const state = reactive({
            count: 0
        })
    
        return {
            ...toRefs(state)
        }
    }
}
</script>
<style lang="scss">
@import url("./assets/css/base.css");
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  background-color: #f6f6f6;
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: 0 -5px 15px rgba(100, 100, 100, 0.1);
  a {
    // font-weight: bold;
    // color: #666;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
  .tab-bar-item {
    flex: 1;
    text-align: center;
    height: 50px;
    font-size: 14px;
  }
  .tab-bar-item .icon {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    display: inline-block;
    vertical-align: middle;
  }
}
</style>
